package com.atos.howl.chaos.pdm.service.impl;

import com.atos.howl.chaos.pdm.dto.user.UserDTO;
import com.atos.howl.chaos.pdm.entity.User;
import com.atos.howl.chaos.pdm.mapper.FileMapper;
import com.atos.howl.chaos.pdm.mapper.UserMapper;
import com.atos.howl.chaos.pdm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author Howl-Xu
 * @version 1.0.0
 * @Description: 请描述一下这个类文件吧
 * @createTime 2020年02月12日 11:15:00
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Resource
    private FileMapper fileMapper;

    @Override
    public String getUUIDByAccount(String account) {
        return userMapper.getUUIDByAccount(account);
    }

    @Override
    public String getUserHeadImgByUUID(String uuid) {
        return fileMapper.getHeadImgBase64ByUUID(uuid);
    }

    @Override
    public UserDTO getUserInfo(String uuid) {
        return userMapper.getUserInfoByUUID(uuid);
    }

    @Override
    public void updateUserInfo(User user) {
        userMapper.updateUserInfo(user);
    }

}
